Skip to content

Avoid default no-ops, force derived classes to override [blocks: #2310] #3362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 14, 2018

Conversation

tautschnig
Copy link
Collaborator

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@smowton
Copy link
Contributor

smowton commented Nov 11, 2018

This seems worse, what is the warning you're working around?

This makes clear what a particular implementation does, and is more consistent
as the base class is already abstract from some other variants of print.
@tautschnig
Copy link
Collaborator Author

This was triggered by warnings about unused parameters, where in this case I though it would be more consistent to enforce overrides (as is already done for some of the other variants of print). So arguably I think it's better/more consistent as proposed, but indeed it might just be a matter of taste rather than well-grounded facts.

Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️
Passed Diffblue compatibility checks (cbmc commit: 6461481).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/90993958

@tautschnig tautschnig removed their assignment Nov 12, 2018
@smowton
Copy link
Contributor

smowton commented Nov 12, 2018

Personally I'd favour (void)param1 etc in an intentional stub, or just remove the names of the args

@tautschnig tautschnig assigned tautschnig and unassigned smowton Nov 12, 2018
@tautschnig
Copy link
Collaborator Author

Merging as we mainly seem to disagree on matters of taste. I surely won't block a later revert should we come up with facts backing up doing it in a different way.

@tautschnig tautschnig merged commit 7f7d8ce into diffblue:develop Nov 14, 2018
@tautschnig tautschnig deleted the vs-no-no-op branch November 14, 2018 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants